<template>
  <div style="min-width: 1000px;height: 40px;" ><h3>管理界面</h3></div>
  <div>
    <el-button @click="toggleCollapse" type="primary">
      {{ isCollapse ? '展开' : '折叠' }}
    </el-button>
    <div class="main1">
      <div>
        <el-row class="tac">
        <el-col :span="12">
        <el-menu
            default-active="2"
            class="el-menu-vertical-demo"
            :collapse="isCollapse"
        >
          <el-menu-item index="1">
            <el-icon><icon-menu /></el-icon>
            <template #title>课程管理</template>
          </el-menu-item>
          <el-menu-item index="2">
            <el-icon><document /></el-icon>
            <template #title>成绩管理</template>
          </el-menu-item>
          <el-menu-item index="3">
            <el-icon><setting /></el-icon>
            <template #title>其他</template>
          </el-menu-item>
        </el-menu>
        </el-col>
        </el-row>
      </div>
      <div>
        <table1></table1>
      </div>
    </div>

  </div>
</template>

<script lang="ts" setup>
import table1 from './table1.vue'
import { ref } from 'vue'
import {
  Document,
  Menu as IconMenu,
  Location,
  Setting,
} from '@element-plus/icons-vue'

const isCollapse = ref(true)

const toggleCollapse = () => {
  isCollapse.value = !isCollapse.value
}
</script>

<style scoped>
.main1{
  display: flex;
}
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;

}
.routerViewContainer[data-v-7a7a37b1] {
  width: auto;
  text-align: left;
}
</style>